package cn.gson.springmvc.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Paycost {
    private int paycostId;
    private String paycostNamee;
    private Integer paycostDeptotall;
    private Integer paycostDepbalancee;
    private Integer paycostOf;

    @Id
    @Column(name = "paycost_id", nullable = false)
    public int getPaycostId() {
        return paycostId;
    }

    public void setPaycostId(int paycostId) {
        this.paycostId = paycostId;
    }

    @Basic
    @Column(name = "paycost_namee", nullable = true, length = 50)
    public String getPaycostNamee() {
        return paycostNamee;
    }

    public void setPaycostNamee(String paycostNamee) {
        this.paycostNamee = paycostNamee;
    }

    @Basic
    @Column(name = "paycost_deptotall", nullable = true, precision = 0)
    public Integer getPaycostDeptotall() {
        return paycostDeptotall;
    }

    public void setPaycostDeptotall(Integer paycostDeptotall) {
        this.paycostDeptotall = paycostDeptotall;
    }

    @Basic
    @Column(name = "paycost_depbalancee", nullable = true, precision = 0)
    public Integer getPaycostDepbalancee() {
        return paycostDepbalancee;
    }

    public void setPaycostDepbalancee(Integer paycostDepbalancee) {
        this.paycostDepbalancee = paycostDepbalancee;
    }

    @Basic
    @Column(name = "paycost_of", nullable = true, precision = 0)
    public Integer getPaycostOf() {
        return paycostOf;
    }

    public void setPaycostOf(Integer paycostOf) {
        this.paycostOf = paycostOf;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Paycost paycost = (Paycost) o;
        return paycostId == paycost.paycostId &&
                Objects.equals(paycostNamee, paycost.paycostNamee) &&
                Objects.equals(paycostDeptotall, paycost.paycostDeptotall) &&
                Objects.equals(paycostDepbalancee, paycost.paycostDepbalancee) &&
                Objects.equals(paycostOf, paycost.paycostOf);
    }

    @Override
    public int hashCode() {
        return Objects.hash(paycostId, paycostNamee, paycostDeptotall, paycostDepbalancee, paycostOf);
    }
}
